const qs=require('querystring')
function bodyParser(req,res,next){
    let str=''
    req.on('data',function(chunk){
      str+=chunk
    })
    req.on('end',function(chunk){
      let body=qs.parse(str)
      req.body=body
  
    })
    next()
  }
  
module.exports=bodyParser